import java.util.HashSet;
import java.util.Iterator;

class Product {
    
    protected String name;
    protected String description;
    protected double price; // Netto
    
    public Product(String name, String desc, double price) {      
        this.name = name;
        this.description = desc;
        this.price = price;
    }
    
    final double getPriceWithTax() {
        return price * 1.19;
    }
    
    public String toString() {
        return name + " - " + description + " - " + price + " EUR";
    }
    
}

class Clothing extends Product {
    
    int size;
    String material;
    
    public Clothing(String name, String desc, double price, int size, String material) {      
        super(name, desc, price);
        this.size = size;
        this.material = material;
    }    
    
    public String toString() {
        return super.toString() + " - " + size + " - " + material;
    }
    
}

class Catalogue {
    HashSet<Product> h;
    
    public Catalogue(HashSet<Product> h) {
        this.h = h;        
    }
    
    public void printMe() {
        Iterator<Product> i = h.iterator();
        Product p;
        while (i.hasNext()) { 
            p  = i.next();
            System.out.println(p.toString() + " - " + p.getPriceWithTax() + " EUR");        
        }
    }
    
}

public class Aufgabe4 {

    public static void main(String[] args) {
        Product paper = new Product("Papier", "A4", 2.52);
        Clothing shirt = new Clothing("Hemd", "Herren-Hemd", 33.61, 48, "Baumwolle");
        
        HashSet<Product> h=new HashSet<Product>();
        h.add(paper); h.add(shirt);
        
        Catalogue c = new Catalogue(h);
        c.printMe();
        
    }

}
